home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / bc_ti / ti656.asc < prev    next >
Text File  |  1992-02-24  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                            NUMBER  :  656
  9.   VERSION  :  2.0
  10.        OS  :  PC DOS
  11.      DATE  :  February 25, 1992                        PAGE  :  1/2
  12.  
  13.     TITLE  :  Speeding Up BC & BCC Under Windows
  14.  
  15.  
  16.  
  17.  
  18.  
  19.   Decremental Speed Differential in BC and BCC
  20.   ============================================
  21.  
  22.   Unfortunately, BC and BCC seem to link more slowly than  their TC
  23.   and TCC counterparts.  Actually, this occurs when linking Windows
  24.   applications,  something that TC and TCC could  not  do  at  all.
  25.   There  are  two  characteristics  of  Windows  applications  that
  26.   combine  to  cause  the  real  mode  linker  to  perform a lot of
  27.   swapping:
  28.  
  29.      1.  The number of symbols in the Windows import library
  30.  
  31.      2.  The pattern of references to symbols in the RTL
  32.  
  33.   In addition,  running under Windows can make things worse because
  34.   EMS is simulated on  disk  by  Windows,  which slows things down.
  35.   When  we  looked  at  tuning  the  linker  to  run faster in this
  36.   specialized situation, any solution we found would have slowed it
  37.   down in every other  situation,  including  running  in protected
  38.   mode.
  39.  
  40.   The  real mode linker uses EMS or disk for swapping data.  EMS is
  41.   obviously  faster  than   disk;  the  difference  is  accentuated
  42.   especially in the situation  that  happens  to occur when linking
  43.   Windows apps.   Outside of Windows, the linker automatically uses
  44.   EMS if it is available.
  45.  
  46.   Under Windows, the linker will only have EMS available if the PIF
  47.   makes it available.    Running  a  real mode linker without a PIF
  48.   under Windows  will  be  slow  because  it  will not have any EMS
  49.   available.  Moreover, Windows in enhanced mode uses  a  swap file
  50.   to simulate low, EMS and XMS  memories.    Even if you have a PIF
  51.   which specifies EMS and you are running the linker under enhanced
  52.   mode,  Windows  may  actually be swapping to disk when the linker
  53.   thinks it's using EMS.    This is even less efficient than having
  54.   the linker itself swap to disk, and it gets very slow.
  55.  
  56.   The  way to prevent Windows from simulating EMS  on  disk  is  by
  57.   specifying EMS memory  as  locked  in  the PIF.  With that setup,
  58.   Windows  will not run the program unless  the  amount  of  memory
  59.   requested is really available.  So the recommended way to run the
  60.   real mode BC or BCC under enhanced mode Windows is to specify one
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Borland C++                            NUMBER  :  656
  75.   VERSION  :  2.0
  76.        OS  :  PC DOS
  77.      DATE  :  February 25, 1992                        PAGE  :  2/2
  78.  
  79.     TITLE  :  Speeding Up BC & BCC Under Windows
  80.  
  81.  
  82.  
  83.  
  84.   and a half meg of EMS  in  the  PIF and specify that it's locked.
  85.   More  EMS will probably not make  a  difference  in  performance.
  86.   However, the protected mode  linker--which  does  no  swapping at
  87.   all--will still be faster.
  88.  
  89.   One final note: BCX  runs  the  protected  mode linker, BCCX does
  90.   not.
  91.  
  92.   The  long  term  solution is to  provide  DPMI  support  for  our
  93.   protected  mode  tools,  which will allow them to run in enhanced
  94.   mode Windows with all the speed that is now demonstrated  by BCX.
  95.   DPMI support is in the works for our future releases.
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.